home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun: Game Pak / rerun-gamepak / hassle castle (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  20KB  |  235 lines

  1. 0 rem"            by fred s. randall
  2. 1 [143]"         box 184d, blackstone st.                   uxbridge ma.01569
  3. 3 rem"            tel. 617-278-3117
  4. 4 [143]"
  5. 5 dimdn$(24):dn$(0)="":fori=1to24:dn$(i)=dn$(i-1)+"":next:dima$(112):dima(18):dimf$(20):printchr$(142):s1=54272:ca=25:gosub4000:gosub9650
  6. 10 poke53280,1:poke53281,1:print"[147][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][145]":fori=1to20:geta$:print"[145][166]                                      [166]":next:print"[145][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":print"[169]         [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]         [223]"
  7. 55 printtab(7)"****** commodore 64 ******":printtab(18)"[169] [223]":printtab(18)"[145] [146] [164][164][146][169][145]":printtab(18)" [146] [163][163][223]":printtab(18)"[145][223] [146][169]":print" do you want to read the scenario?"
  8. 85 printtab(16)"[145](y or n)":fort=1to300:next:geta$:printtab(16)"[145](y or n)":fort=1to300:next:ifa$=""then85
  9. 95 ifa$="y"thenl=20:ca=2:gosub4500
  10. 98 print"[147]":poke53280,0:poke53281,0:s1=54272:gosub5530:restore:l=20:e=100:s=12:ti$="000000":s1=54272:pw=0:sc=0:k=0:tr=0:au=0:ca=0:fori=0to111:reada$(i):next:fori=0to19:readf$(i):next:r=rnd(-.9):goto154
  11. 125 forx1=1to24:pokes1+x1,0:next:return
  12. 150 ifz=1then170
  13. 153 gosub300:ife>250orr<2then800
  14. 154 q=6+(1andl<2):ifl>20ande<50thengosub9300
  15. 155 gosub300:ifl<0orau>350ands>3andr<10thengosub400
  16. 156 forb=1to3:a(b)=int(rnd(1)*q)+1:ifa(b)<3thengosub900
  17. 157 next:ifl>25then650
  18. 158 ifa(1)=3anda(2)=3anda(3)=3then156
  19. 159 ifa(1)=7ora(2)=7ora(3)=7thenpw=1:gosub1000:gosub3200:goto170
  20. 160 hp=0:gosub1000:ona(1)gosub2200,2200,169,2000,2600,2800:ona(2)gosub3000,3000,169,3100,2500,2400:ona(3)gosub2300,2300,169,2100,2700,2900
  21. 167 geta$:ifa$<>""then167
  22. 168 goto170
  23. 169 return
  24. 170 z=0:gosub200:printtab(11)"[158]which direction?":print"[155] ([158]l[152]-left, [158]f[152]-forward, [158]r[152]-right, [158]s[152]-status)";
  25. 172 b=0:geta$:b$=a$:ifa$=""then172
  26. 173 b=b+(1andb$="l")+(2andb$="f")+(3andb$="r"):ifb$="s"then350
  27. 176 ifb<1thengosub530:gosub200:goto170
  28. 177 ifpw=1then450
  29. 178 ona(b)gosub550,550,250,9900,9700,9800:gosub200:gosub300:ifr>85thengosub500
  30. 180 iftr>9andr<trthengosub700
  31. 181 goto150
  32. 200 printdn$(16):forx=1to7:print"                                       ":next:printdn$(16):return
  33. 250 gosub200:print"[129]    you walked into a wall,stupid![155]":fort=1to1000:z=1:next:ifr>50thengosub200:return
  34. 260 print"[129] it's unstable,it crumbles! rocks fall!":print" you are knocked to the ground, costing":print" you ";r,"units of energy![155]":e=e-r:fort=1to3000:next:gosub200:return
  35. 300 r=int(rnd(1)*101):return
  36. 301 r=int((rnd(1)*32)+1):return
  37. 302 m=int(rnd(1)*101):return
  38. 303 q=int(rnd(1)*10)+102:return
  39. 350 gosub200:print"[158][145]":ife>=100thenprint"[145]"
  40. 352 ife>200ore<50orau>350ands>3thenprint"[129][145]"
  41. 354 printtab(6)"remaining energy -"e:printtab(6)"remaining spells -"s:printtab(11)"gold pieces -"au:printtab(7)"creatures slain -"k:printtab(7)"treasure credit -"tr:tx$=ti$:tp$=left$(tx$,2)+":"+mid$(tx$,3,2)+":"+right$(tx$,2):print"[158] time - "tp$;:sc=(au+(1andau=0))*(k+(1andk=0))*(tr+(1andtr=0))
  42. 370 printspc(5)"score -"sc-(1andsc=1):fort=1to1000:next
  43. 371 ifpeek(197)=13then371
  44. 372 gosub200:goto170
  45. 400 print"[147][158]":poke53281,9:poke53280,9:printdn$(8)tab(13)"gold grabbers!":print" hundreds of little gold grabbers swarm":print"[158] around you, scooping up all your gold!":print" then they drag you off, depositing you":au=0:l=l+1:print" on level[153]";l:print"[144]":gosub10350:ifl<3thene=0:s=0:tr=0
  46. 414 fort=1to4000:next:poke53280,11:poke53281,0:return
  47. 450 gosub9650:iftr<10thentr=10
  48. 452 poke53280,0:tx$=ti$:tp$=left$(tx$,2)+":"+mid$(tx$,3,2)+":"+right$(tx$,2):gosub4000:printtab(10)"congratulations!!":sc=au*tr*k:print" your score is"sc"(hit shift)":gosub5600
  49. 458 poke53280,1:poke53281,1:print"[147][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][145]":fori=1to21:print"[145][166]                                      [166]":next:print"[145][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":print"[169]         [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]         [223]"
  50. 466 print"[145] ******** [146] hassle  castle  ******** ":print"[223]                                  [146][169]":printtab(14)"[151]score totals":printtab(9)"gold pieces -[151]";au:printtab(5)"monsters killed -[151]"k:printtab(5)"treasure credit -[151]"tr:printtab(4)"remaining energy -[151]"e:printtab(4)"remaining spells -[151]"s
  51. 480 printtab(5)"total game time -[151] "tp$:printtab(9)"total score -[151]"sc:geta$:ifa$<>""thena$=""
  52. 484 printtab(8)"[151] another game?(y or n) [145]":fort=1to300:next:geta$:printtab(22)"[155](y or n) [145]":fort=1to300:next:ifa$=""then484
  53. 488 ifa$="y"thengoto10
  54. 490 ifa$<>"n"then484
  55. 492 ca=100:gosub4000:print"[144]":end
  56. 500 gosub302:gosub200:gosub600:print"[155] faces you!   "
  57. 507 print"[158] well? [155]([158]c[155]-combat,[158]s[155]-spellcast,[158]r[155]-retreat)":gosub1300:n=0:b$=a$:ifb$<>"s"andb$<>"r"andb$<>"c"thengosub530:gosub200:goto507
  58. 510 ifb$="c"thenn=1:gosub9000:goto516
  59. 512 ifb$="s"thenn=1:gosub9100:goto516
  60. 514 ifb$="r"thengosub300:l=l+1:printtab(15)"[129]wait![158]":ifr<40then525
  61. 515 ifb$="r"thenn=2:z=0:goto520
  62. 516 ifn<1then507
  63. 520 fort=1to2000:next:return
  64. 525 print" oh no..it's chasing you..combat mode![145][145]":fort=1to2000:next:goto9000
  65. 530 gosub200:print"[156] what do you mean,[155]"chr$(34)b$chr$(34)"[156]? that's foolish!":print"[145][145]":fort=1to2000:next:n=0:return
  66. 550 gosub200:print"[158]      door[155] ([158]o[155]-open or [158]l[155]-listen)?":hp=0
  67. 552 gosub1300:b$=a$:ifb$<>"l"andb$<>"o"thengosub530
  68. 554 ifb$="l"thenn=1:goto560
  69. 556 ifb$="o"thenn=1:goto9400
  70. 557 ifn<1then550
  71. 558 goto552
  72. 560 gosub200:printtab(6)"[155]you hear ";:ifa(b+3)>0thenprinta$(a(b+3));"[155] noises!"
  73. 564 ifa(b+3)=0thenprint"[155]..........nothing."
  74. 566 print"[158] now what? [155]([158]g[155]-go in,[158]l[155]-leave,or [158]h[155]-help)":gosub1300:b$=a$:ifb$="g"then9400
  75. 572 ifb$="l"then578
  76. 574 ifb$="h"then950
  77. 576 gosub530:goto566
  78. 578 print"[145]       -------[158] coward! -------         [145]":fort=1to500:next:z=1:ifint(rnd(0)*100)<10then800
  79. 582 gosub200:print"[145][145][145][145]":return
  80. 600 gosub10000:print"[155] a";:ad=int(rnd(.)*6)+1:onadgoto606,608,610,612,614,616
  81. 606 print"n immense ";:goto618
  82. 608 print" hideous ";:goto618
  83. 610 print" humungous ";:goto618
  84. 612 print" gigantic ";:goto618
  85. 614 print"n ugly ";:goto618
  86. 616 print" monstrous ";:goto618
  87. 618 printa$(m);:return
  88. 650 gosub708:print"[147][155]":printchr$(14):print""tab(7)"it seems too bad.......":print"[212]he walls are starting to crumble and":print"pieces of the ceiling are falling all":print"around you![217]ou must have gone into an":print"unsafe area of the dungeons!":fori=1to3000:next
  89. 662 poke53281,int(rnd(.)*15)+1:gosub708:poke53281,0:fort=1to2000:next:print"[201]n the future, try to be a little":print"more careful about going so deep in..":print"[158][212][200][197][160][196][213][206][199][197][207][206][211][160][207][198][160][200][193][211][211][204][197][160][195][193][211][212][204][197]!":poke53281,int(rnd(.)*15)+1:gosub708:poke53281,0:fori=1to10000:next:print"[147]";chr$(142):sc=au*k:goto9020
  90. 700 gosub200:print"[129]   tremor!!..a wall is crumbling!":tr=tr-int(rnd(.)*4)+1:print"   some of your treasures are lost!!"
  91. 708 gosub10400:forp=1to3:fori=1to12:poke53270,i:fort=1to25:next:poke53270,8:fort=1to25:next:next:next:gosub10406:retu